FreeCore Function #9:
512-point Sine
Module name: sine
Current release: version 1.0, August 19, 1997
Contributed by: Rune Baeverrud

Introduction

Shown below is the schematic representation of the Sine Module.

The Sine Module has the following key properties:

Based on the Cosine Module

The Sine Module is based on the Cosine Module. The parameters are all passed through - the Sine Module only modifies the Angle input to provide a 90 degrees phase shift into the Cosine Module.

The Cosine Look-up Table

The cosine look-up table was generated using the MIFGEN utility also available on this web site. The MIFGEN utility was set up with the following parameters:

Two files exists, one with Offset = 0 named "COS180N.MIF" and another with Offset = 128 named "COS180P.MIF". COS180N.MIF will be used if parameter POLARITY is set to "BIPOLAR", and COS180P.MIF will be used if parameter POLARITY is set to "UNIPOLAR". Options = "Symmetry" was chosen, requiring absolutely no manipulation of the look-up table output. This gives the advantage of high speed and very compact design. The amplitude was chosen to 126.2 - giving the highest possible SNR and therefore the closest approximation to a pure cosine.

High Speed

With no pipelining (all levels set to "UNREGISTERED") a speed of 30-40 MHz is achievable in a FLEX 10K -3 device. With level 1, 2 and 3 set to "REGISTERED" (3 levels of pipeline) a speed of above 80MHz is achievable in a FLEX 10K -3 device.

Module Parameters

PARAMETERS
POLARITY Set to "UNIPOLAR" (1..128..255) operation or "BIPOLAR" (-126..0..126) operation (using 2's complement).
LEVEL1 Should be "REGISTERED" or "UNREGISTERED". Level 1 is the output of the subtractor ("angle/index modifier") and multiplexer which feeds the EAB look-up table.
LEVEL2 Should be "REGISTERED" or "UNREGISTERED". Level 2 is the input registers in the EAB look-up table.
LEVEL3 Should be "REGISTERED" or "UNREGISTERED". Level 3 is the output registers in the EAB look-up table.
INPUT PORTS
SysClk System clock input.
Angle[8..0] 9 bits (512 indexes) input giving the relative angle on the unit circle. Values 0-255 correspond to angles in the 0-180 degree range, values 256-511 correspond to angles in the 180-360 degree range.
OUTPUT PORTS
Wave[7..0] Digital Waveform output, unipolar or bipolar, depending on the POLARITY parameter setting.

NOTE: You need to copy the files COS180N.MIF and COS180P.MIF to your current working directory.

Enjoy!


Last updated 08 Feb 2001 11:53